//
//  CheckButton.m
//  HundredsICT
//
//  Created by chen wei on 14-2-22.
//  Copyright (c) 2014年 mac. All rights reserved.
//

#import "CheckButton.h"

@implementation CheckButton
@synthesize selected, name;

- (void) setSelected:(BOOL)bFlag {
    
	if (bFlag) {
		[self setImage:[UIImage imageNamed:@"多选s.png"] forState:UIControlStateNormal];
		[self setImage:[UIImage imageNamed:@"多选s.png"] forState:UIControlStateHighlighted];
	} else {
		[self setImage:[UIImage imageNamed:@"多选.png"] forState:UIControlStateNormal];
		[self setImage:[UIImage imageNamed:@"多选.png"] forState:UIControlStateHighlighted];
	}
    selected = bFlag;
}
- (NSString*) labelText {
	return [self titleForState:UIControlStateNormal];
}
- (void) setLabelText:(NSString *)title {
    self.titleLabel.font = [UIFont systemFontOfSize:14];
    [self setTitleColor:[UIColor colorWithHexString:@"999999"] forState:UIControlStateNormal];
	[self setTitle:title forState:UIControlStateNormal];
	[self setTitle:title forState:UIControlStateHighlighted];
}
- (void) changeSelect:(UIButton*)button {
	if (button == self) {
		self.selected = !self.selected;
	}
}

@end
